<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>用户中心</title>
	<link rel="stylesheet" type="text/css" href="../../static/news/css/reset.css">
	<link rel="stylesheet" type="text/css" href="../../static/news/css/jquery.pagination.css">
    <link rel="stylesheet" type="text/css" href="../../static/news/css/main.css">
    <script type="text/javascript" src="../../static/news/js/jquery-1.12.4.min.js"></script>
	<script type="text/javascript" src="../../static/news/js/jquery.pagination.min.js"></script>
</head>
<body class="inframe_body">
    <div class="news_list">
        <h3>新闻列表</h3>
        <ul class="article_list">
            {% for news in data.news_list %}
            <li><a href="/{{ news.id }}" >{{ news.digest }}</a><em class="pass">{{ news.status|status_filter }}</em><span>{{ news.create_time }}</span>
                {% if news.status==-1 %}
                    <b style="">未通过因{{ news.reason }}</b>
                {% endif %}
            </li>

{#            <li><a href="#">智能音箱“不智能”：这次轮到三星语音助手Bixby被吐槽了</a><em class="pass">已通过</em><span>2018-1-17</span></li>#}
{#            <li><a href="#">智能音箱“不智能”：这次轮到三星语音助手Bixby被吐槽了</a><em class="review">审核中</em><span>2018-1-17</span></li>#}
{#            <li><a href="#">智能音箱“不智能”：这次轮到三星语音助手Bixby被吐槽了</a><em class="review">审核中</em><span>2018-1-17</span></li>#}
{#            <li>#}
{#                <a href="#">智能音箱“不智能”：这次轮到三星语音助手Bixby被吐槽了</a>#}
{#                <em class="nopass">未通过</em>#}
{#                <span>2018-1-17</span>#}
{#                <b>未通过原因：因为写的太boring,因为写的太boring,因为写的太boring,因为写的太boring,</b>#}
{#            </li>#}
{#            <li>#}
{#                <a href="#">智能音箱“不智能”：这次轮到三星语音助手Bixby被吐槽了</a>#}
{#                <em class="nopass">未通过</em>#}
{#                <span>2018-1-17</span>#}
{#                <b>未通过原因：因为写的太煽情,因为写的太煽情,因为写的太煽情,因为写的太煽情,</b>#}
{#            </li>#}
            {% endfor %}
        </ul>
        <div id="pagination" class="page"></div>

{#        <div class="current_page" style="display: none" value="{{ data.current_page }}"></div>#}
{#        <div class="total_page" style="display: none" value="{{ data.total_page }}"></div>#}
{#        <script>#}
{#            // 调用父页面的方法改变菜单指示#}
{#            // window.parent.fnChangeMenu(2);#}
{##}
{#            $(function(){#}
{#                $("#pagination").pagination({#}
{#                    currentPage:2 ,#}
{#                    currentPage:{{ data.current_page }} ,#}
{#                    totalPage: {{ data.total_page }},#}
{#                    totalPage:3 ,#}
{#                    callback: function(current) {#}
{#                        alert('ok!');#}
{#                    }#}
{#                });#}
{#            });#}
{#        </script>#}
       <script>
            // 调用父页面的方法改变菜单指示
            // window.parent.fnChangeMenu(2);

            $(function(){
                $("#pagination").pagination({
                    currentPage: {{ data.current_page }},
                    totalPage: {{ data.total_page }},
                    callback: function(current) {
{# 该方法不能实现页面调转：location.reload().href = '/user/news_list?p=' + current#}
                        window.location.href = '/user/news_list?p=' + current
                        }
                });
            });
        </script>
    </div>
</body>
</html>